<html>
<head>
<title>Test page for CubicEx</Title>
<script language="javascript">

		var DaCondition = true;

		var myWidth=0;
		var myHeight=0;
		var p=false;


		var p_focus=false;
		
		
		function AltKeyUp(){
			 var touche=window.event.keyCode;
			 //var touche=18;
			 // Alt
			 if (touche==18){
				var input=document.getElementById('AltKeyUp_id');
				input.value='MyText';	
			 }else{
			 	window.alert(touche);
			 }
		}



		function Close__(){
			   window.open("popup.html","POPUP","menubar=no, status=no, scrollbars=no, menubar=no, width=200, height=100");
			
		}



		function WindowMaximize(){
			
			if (p==false){
		    myWidth = document.body.clientWidth;
		    myHeight = document.body.clientHeight;

	
		    p=true;
			}else{
				if ( (document.body.clientWidth > myWidth) 
						|| (document.body.clientHeight > myHeight) ){
					var input=document.getElementById('text_maximize_id');
					input.value="02";	
					//document.bgColor="#25A725";
					
				}
			}
					
			//alert(myWidth + " , " + myHeight);

		}




		function WindowFocus(){
			
			if (p_focus==false){
			window.onfocus=WindowFocus;
			
			window.blur();			
		    p_focus=true;
			}else{
				var input=document.getElementById('id_wfocus');
				input.value="02";	
				
			}
					
			//alert(myWidth + " , " + myHeight);

		}

		function MouseOut(){
			var input=document.getElementById('id_mouseOut');
			input.value="02";	
		
		}

		function MouseOver(){
			var input=document.getElementById('id_mouseOver');
			input.value="02";	
		
		}


		function MouseMove(){
			var input=document.getElementById('id_mouseMove');
			input.value="02";	
		
		}


		function MouseUp(){
			var input=document.getElementById('id_mouseUp');
			input.value="02";	
		
		}
		
		
		function MouseUpRight(e){
		if (e.button==2){
			var input=document.getElementById('id_mouseUpRight');
			input.value="02";	
		}
		}

		function MouseDownRight(e){
			if (e.button==2){
				var input=document.getElementById('id_mouseDownRight');
				input.value="02";	
			}
			}


		function Refresh(){
			var input=document.getElementById('id_Refresh');
			input.value="02";	
		
		}		


		function AssignId(){
			var input=document.getElementById('id_AssignId');
			input.value="02";	
		}

		
		function AnswerOnNextPrompt(){
			var rep=window.prompt();

			if (rep=="ok"){
				var input=document.getElementById('id_Answer');
				input.value="02";
			}
		}

		
	    function getCookieVal (offset) {
	        var endstr = document.cookie.indexOf (";", offset);
	        if (endstr == -1)
	          endstr = document.cookie.length;
	        return unescape(document.cookie.substring(offset, endstr));
	      }
	      


		function FuncCreateCookie(){

			var name="CookieTest=";
			var n=document.cookie.length;
			alert(n);
			document.cookie += "test=aa";
			alert(document.cookie.length);
		   	var alen = arg.length;
			var i=0;

			while (i<n){
			   var j = i + alen;
			   if (document.cookie.substring(i, j) == arg){
				  alert(document.cookie.substring(i, j));				     
			      var value= getCookieVal (j);
				  var input=document.getElementById('id_CreateCookie');
				  input.value=value;
			      return;
			   }
			   i = document.cookie.indexOf(" ", i) + 1;
			   if (i == 0) break; 
			}
			      return;

			}




		function FuncFocus(){
			var input=document.getElementById('id_Focus');
			input.value="02";
		}


		function FuncMouseDown(){
			var input=document.getElementById('id_MouseDown');
			input.value="02";
		}
		
		</script>


</head>


<body onkeyUp="javascript:AltKeyUp();"
	onLoad="javascript:WindowMaximize();" bgcolor="#FFFFFF">
<table>
	<tr>
		<td>AltKeyUp : <input type="text" id="AltKeyUp_id"
			style="visibility: visible" /></td>
	</tr>

	<tr>
		<td>Check : <input type="radio" id="check_1" name="check_test"
			value="1">check 1<br />
		Check : <input type="radio" id="check_2" name="check_test" value="1">check
		2<br />
		Check : <input type="radio" id="check_3" name="check_test" value="1">check
		3<br />
		</td>
	</tr>

	<tr>
		<td>ClickAt :Check : <input type="radio" id="check_ClickAt"
			value="1">check ClickAt<br />
		</td>
	</tr>


	<tr>
		<td>Popup : <A href="#" id="link_close"
			onClick="javascipt:Close__();">Link</A><br />
		</td>
	</tr>



	<tr>
		<td>DoubleClick : <input type="checkbox" id="check_doubleClick">
		CheckboxTestDoubleClick<br />
		</td>
	</tr>


	<tr>
		<td>goBack : <A href="popup.html" id="link_goBack">Link
		GoBack</A><br />
		</td>
	</tr>


	<tr>
		<td><font style="BACKGROUND-COLOR: #FFFFFF" id="text_highlight">Test
		Highlight</font><br />
		</td>
	</tr>


	<tr>
		<td>Test windowsMaximize : <input type="button"
			ID="button_maximize_id" value="Test"
			onClick="javascript:WindowMaximize();"> <input type="text"
			id="text_maximize_id" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test MouseOut : <input type="button" ID="button_mouseOut_id"
			value="Test_MouseOut" onMouseOut="javascript:MouseOut(event);">
		<input type="text" id="id_mouseOut" value="01"><br />
		</td>
	</tr>


	<tr>
		<td>Test MouseOver : <input type="button"
			ID="button_mouseOver_id" value="Test_MouseOver"
			onMouseOver="javascript:MouseOver();"> <input type="text"
			id="id_mouseOver" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test MouseMove : <input type="button"
			ID="button_mouseMove_id" value="Test_MouseMove"
			onMouseMove="javascript:MouseMove();"> <input type="text"
			id="id_mouseMove" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test MouseUp : <input type="button" ID="button_mouseUp_id"
			value="Test_MouseUp" onMouseUp="javascript:MouseUp();"> <input
			type="text" id="id_mouseUp" value="01"><br />
		</td>
	</tr>


	<tr>
		<td>Test MouseUpRight : <input type="button"
			ID="button_mouseUpRight_id" value="Test_MouseUpRight"
			onMouseUp="javascript:MouseUpRight(event);"> <input
			type="text" id="id_mouseUpRight" value="01"><br />
		</td>
	</tr>





	<tr>
		<td>Test MouseDownRight : <input type="button"
			ID="button_mouseDownRight_id" value="Test_MouseDownRight"
			onMouseDown="javascript:MouseDownRight(event);"> <input
			type="text" id="id_mouseDownRight" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test Open : <input type="text" id="id_Open" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test Refresh : <input type="button" ID="button_Refresh_id"
			value="Test_Refresh" onClick="javascript:Refresh();"> <input
			type="text" id="id_Refresh" value="01"><br />
		</td>
	</tr>


	<tr>
		<td>Test assignId : <input type="button" ID="button_AssignId_id"
			value="Test_Assignid" onClick="javascript:AssignId();"> <input
			type="text" id="id_AssignId" value="01"><br />
		</td>
	</tr>


	<tr>
		<td>Test answerOnNextPrompt : <input type="button"
			ID="button_Answer_id" value="Test_AnswerOnNextPrompt"
			onClick="javascript:AnswerOnNextPrompt();"> <input
			type="text" id="id_Answer" value="01"><br />
		</td>
	</tr>





	<tr>
		<td>Test CreateCookie : <input type="button"
			ID="button_CreateCookie_id" value="Test_CreateCookie"
			onClick="javascript:FuncCreateCookie();"> <input type="text"
			id="id_CreateCookie" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test Focus : <input type="button"
			ID="button_Focus_id" value="Test_Focus"
			onFocus="javascript:FuncFocus();"> <input type="text"
			id="id_Focus" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test KeyPress : <input type="text" id="id_KeyPress" value="01"><br />
		</td>
	</tr>



	<tr>
		<td>Test MouseDown : <input type="button"
			ID="button_MouseDown_id" value="Test_MouseDown"
			onMouseDown="javascript:FuncMouseDown();"> <input type="text"
			id="id_MouseDown" value="01"><br />
		</td>
	</tr>
	
	<tr>
		<td><input type="text" id="AttributeFromAllWindows" attr="test"></td>
	</tr>
	
	<tr>
		<td><FORM METHOD=GET ACTION="End.html" id="submitForm">
		<input type="text" id="input_no_text_1_id" name="input_no_text_1_id">
		</FORM></td>
	</tr>

</table>




</body>
</html>